for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
import {
Row
} from './row.js';
HeaderCell
} from './celltypes/header.js';
/**
HeaderRow is a controller for a row of header cells.
@class Backgrid.HeaderRow
@extends Backgrid.Row
*/
var HeaderRow = Row.extend({
Initializer.
@param {Object} options
@param {Backbone.Collection.<Backgrid.Column>|Array.<Backgrid.Column>|Array.<Object>} options.columns
options.columns
@param {Backgrid.HeaderCell} [options.headerCell] Customized default
HeaderCell for all the columns. Supply a HeaderCell class or instance to a
the `headerCell` key in a column definition for column-specific header
rendering.
@throws {TypeError} If options.columns or options.collection is undefined.
initialize: function () {
Row.prototype.initialize.apply(this, arguments);
},
makeCell: function (column, options) {
var headerCell = column.get("headerCell") || options.headerCell || HeaderCell;
headerCell = new headerCell({
headerCell
column: column,
collection: this.collection
});
return headerCell;
}
export {
HeaderRow
};